package com.nuhu.controller;


import com.nuhu.pojo.CustomerServiceRecord;
import com.nuhu.pojo.Package;
import com.nuhu.pojo.Result;
import com.nuhu.pojo.User;
import com.nuhu.pojo.Worker;
import com.nuhu.service.admin_PackageService;
import com.nuhu.service.admin_workerFucService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Slf4j
public class admin_PackageController {


    @Autowired
    private admin_PackageService adminPackageService;

    @GetMapping("/Allpackage")
    @ResponseBody
    public List<User> getPackage(@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int size) {
        System.out.println("6666");
        return adminPackageService.getPackage(page, size);
    }


    @GetMapping("/Allpackageinformation")
    @ResponseBody
    public Package searchUser(String packageId) {
        System.out.println("(controller)该值是"+packageId);
        System.out.println("jin ru Controller");
        return adminPackageService.getpackageimformation(packageId);
    }


}
